package com.itheima.vo;

import com.itheima.domain.db.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class AcousticVo implements Serializable {


    private Integer id;  //id
    private String avatar;  //头像
    private String nickname;  //昵称
    private String gender;  //性别
    private Integer age;  //年龄
    private String soundUrl;  //语音地址
    private Integer remainingTimes;  //次数


    public    void setUserInfo(UserInfo userInfo, String url, Integer number) {

        this.id = userInfo.getId().intValue();
        this.avatar = userInfo.getAvatar();
        this.nickname = userInfo.getNickname();
        this.gender = userInfo.getGender();
        this.age = userInfo.getAge();
        this.remainingTimes = number;
        this.soundUrl = url;


    }


}
